<div class="alert alert-success"><span class="glyphicon glyphicon-info-sign"></span> 填写商户基本信息</div>
<form action="" class="form-horizontal" role="form">

	<div class="form-group">
		<label class="col-sm-1 control-label">名称</label>
		<div class="col-sm-3">
			<input type="text" class="form-control" name="name" placeholder="" datatype="*2-30" value="{$customer.name}"/>
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-sm-1 control-label">地区</label>
		<div class="row">
			<div class="col-sm-2">
				<select class="form-control" id="province" name="province" datatype="*">{$provinceOptions}</select>
			</div>
			<div class="col-sm-2">
				<select class="form-control" id="city" name="city" datatype="*">{$cityOptions}</select>
			</div>
			<div class="col-sm-2">
				<select class="form-control" id="area" name="area" datatype="*">{$areaOptions}</select>
			</div>		
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-sm-1 control-label">具体地址</label>
		<div class="col-sm-3">
			<input id="suggestId" type="text" class="form-control" name="address" placeholder="商户的具体地址" datatype="*" value="{$customer.address}"/>
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-sm-1 control-label">联系人</label>
		<div class="col-sm-3">
			<input type="text" class="form-control" name="contacts" placeholder="让客户及时与商户取得联系" datatype="*2-30" value="{$customer.contacts}" />
		</div>
	</div>
	
	<div class="form-group">
		<label class="col-sm-1 control-label">联系人电话</label>
		<div class="col-sm-3">
			<input type="text" class="form-control" name="tel" placeholder="让客户及时与商户取得联系" datatype="phone" value="{$customer.tel}"/>
		</div>
	</div>
	
	<div class="form-group">
		<div class="col-sm-offset-1 col-sm-8">
			<button type="submit" class="btn btn-primary submit" data-loading-txt="提交中，请稍后……" data-ajax-url="__CONTROLLER__/indexPost">保存更改</button>
		</div>
	</div>
</form>

<script type="text/javascript">
	$(function(){
		$("#province").change(function(){
			var pro = $(this).val();
			$.post("__CONTROLLER__/getCityPost", {code: pro} ,function(data){
				$("#city").html(data);
			});
		});
		
		$("#city").change(function(){
			var cit = $(this).val();
			$.post("__CONTROLLER__/getAreaPost", {code: cit} ,function(data){
				$("#area").html(data);
			});
		});
	});
</script>